<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>忘记密码</title>
	<style>
    *{
    margin:0;
    padding:0;
    }
	body{
	min-width: 1100px;
	min-height:400px;
	background:#F98A53;
	margin: 0;
	padding: 0;
	position: relative;
	}
	#forget_Panel{
	width:422px;
	height:493px;
	background:url(img/bg.jpg);
	margin:0 auto;
	margin-top: 50px; 
	text-align:center;
	overflow: hidden;
	}
    #logo-panel{
    width: 48px;
    height: 48px;
    margin:0 auto;
    margin-top:50px;
    }
	#email{
	width:280px;
	height:32px;
	margin:0 auto;
	margin-top:50px;
	padding-left:10px;
	}
	#verifycode{
	width:280px;
	height:32px;
	margin:0 auto;
	margin-top:20px;
	padding-left:10px;
	}
	#find{
	width:280px;
	height:40px;
	margin-top: 70px;
	background-color: #f9671e;
	color:#fff;
	font-size: 16px;
	border: solid 2px #f9671e;
	border-radius: 10px;
	outline:none;
	}
	#find:hover{
	background: none;
	cursor:pointer;
	}
	#tip1{
	font-size: 12px;
	color: red;
	text-align:left;
	margin:5px auto;
	width:280px;
	height:12px;
	}
	#tip2{
	font-size: 12px;
	color: red;
	text-align:left;
	margin:5px auto;
	width:280px;
	height:12px;
	}
	</style>
</head>
<body>
<div id="forget_Panel">
    <div id="logo-panel"><img src="img/find.png" /></div>
	<form id="demoform">
	
		<input type="text"  id="email"    placeholder="邮箱地址" />
		<div id="tip1"></div>
		<input type="text"  id="verifycode"    placeholder="验证码" maxlength="16"/>
		<div id="tip2"></div>
		<input type="submit" name="login" id="find" value="立刻找回" onclick = "return check()"/>
	</form>
	
</div>
</body>
<script>
   var email = document.getElementById('email');
  var verifycode = document.getElementById('verifycode');
  var emailreg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ ;
  function check(){ 
  return false;
  }
  
    email.onblur = function(){
    if(!email.value){tip1.innerHTML = "*请输入用于登录的邮箱地址";}
    else{
    if(!emailreg.test(email.value)){tip1.innerHTML = "*请输入正确的邮箱地址";}
    else{tip1.innerHTML = "";}
    }
    }
    
    verifycode.onblur = function(){
    if(!verifycode.value){tip2.innerHTML = "*请输入验证码";}
    else{
    if(verifycode.value!= "1234"){tip2.innerHTML = "*验证码错误"}
    else{tip2.innerHTML = "";}
    }
    }
    
    function check(){
    if(!email.value){tip1.innerHTML = "*请输入用于登录的邮箱地址";}
    else{
    if(!emailreg.test(email.value)){tip1.innerHTML = "*请输入正确的邮箱地址";}
    else{
    tip1.innerHTML = "";
    }
    }
    return false;
    }
  
  </script>
</html>